package com.ymttest.database.sqlwapper.fqlorder;

import java.util.List;

import com.ymt.database.SqlManager;
import com.ymttest.database.model.fqlorder.FqlSyncTask;

public class FqlSyncTaskWrapper {
	
	SqlManager manager;

	public FqlSyncTaskWrapper() {
		manager = new SqlManager("fqlordersync");
	}

	@SuppressWarnings("unchecked")
	public FqlSyncTask selectByPrimaryKey(Long id) {

		FqlSyncTask fqlSyncTask = new FqlSyncTask();
		List<FqlSyncTask> result = manager
				.getSelectResults(
						"com.ymttest.database.mapping.fqlorder.FqlSyncTaskMapper.selectByPrimaryKey",
						id);
		manager.commit();

		if (result.size() > 0) {
			fqlSyncTask = result.get(0);
		}

		return fqlSyncTask;
	}
	
	public static void main(String[] args) {
		
		FqlSyncTaskWrapper wrapper = new FqlSyncTaskWrapper();
		
		System.out.println(wrapper.selectByPrimaryKey(1L).getTask_type());
	}
}
